import request from '@/utils/request'

// 查询企业的部门列表
export function getEmployeeList(data) {
    return request({
        url: '/api/sys/user',
        method: 'get',
        params: data
    })
}

// 删除
export function delDemployees(id) {
    return request({
        url: '/api/sys/user/' + id,
        method: 'delete'
    })
}

// 新增
export function addEmployee(data) {
    return request({
        method: 'post',
        url: '/api/sys/user',
        data
    })
}

/**
 * @description: 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployee(data) {
    return request({
        url: '/api/sys/user/batch',
        method: 'post',
        data
    })
}


export function getEmployeeDetail(id) {
    return request.get('/api/sys/user/' + id)
}

// 更新数据
export function updateEmployee(data) {
    return request.put('/api/sys/user/' + data.id,data)
}